package com.dubbo.register;

import java.util.HashMap;
import java.util.Map;

public class RegisterFactory
{
    public static final String LOCAL = "local";
    public static final String REMOTE = "remote";
    //本地注册器，保存  key=接口，value=实现类
    private static Map<String, Object> localRegister = new HashMap<String, Object>();

    //远程注册中心注册器，保存  key=接口， value=URL
    private static Map<String, Object> remoteRegister = new HashMap<String, Object>();

    public static Map<String, Object> get(String key)
    {
        if(LOCAL.equals(key))
        {
            return localRegister;
        }
        return remoteRegister;

    }
}
